import java.io.Serializable;

public class ChoiceQuestion implements HaveAnswer, Serializable {

    private static final long serialVersionUID = -1333997943174750997L;
    transient public static final int LINE_NUMBER = 6;
    transient public static final double SCORE_VALUE = 10.0;
    private String question;
    public String optionA;
    public String optionB;
    public String optionC;
    public String optionD;
    private String answer;

    public ChoiceQuestion(String question, String optionA, String optionB, String optionC, String optionD, String answer) {
        this.question = question;
        this.optionA = optionA;
        this.optionB = optionB;
        this.optionC = optionC;
        this.optionD = optionD;
        this.answer = answer.toUpperCase();
    }

    public ChoiceQuestion(String[] args) {
        question = args[0];
        optionA = args[1];
        optionB = args[2];
        optionC = args[3];
        optionD = args[4];
        answer = args[5].toUpperCase();
    }

    public String getQuestion() {
        return question;
    }

    public String getAnswer() {
        return answer;
    }

    @Override
    public String toString() {
        return "选择题{" +
                "题干='" + question + '\'' +
                ", A选项='" + optionA + '\'' +
                ", B选项='" + optionB + '\'' +
                ", C选项='" + optionC + '\'' +
                ", D选项='" + optionD + '\'' +
                ", 答案='" + answer + '\'' +
                '}';
    }
}
